<template>
  <a-result status="500" title="500" sub-title="Sorry, the server is reporting an error.">
    <template #extra>
      <a-button type="primary" @click="toHome">
        Back Home
      </a-button>
    </template>
  </a-result>
</template>

<script>

import {initTheme} from '@/components/SettingDrawer/settingConfig'
import defaultSettings from '@/config/defaultSettings'
  export default {
    name: 'Exception500',
    mounted () {
        //初始化主题
        this.initTheme()
    
    },
    methods: {
        initTheme(){
            let theme = localStorage.getItem(defaultSettings.localStorageThemeKey)
            initTheme(theme || defaultSettings.primaryTheme)
        },
        toHome () {
            this.$router.push({ path: '/' })
        }
    }
  }
</script>